import 'package:flutter/material.dart';

class CarAnimationPage extends StatefulWidget {
  const CarAnimationPage({Key? key}) : super(key: key);

  @override
  _CarAnimationPageState createState() => _CarAnimationPageState();
}

class _CarAnimationPageState extends State<CarAnimationPage> with TickerProviderStateMixin{

  late AnimationController _rotationController;

  @override
  void initState() {
    // TODO: implement initState
    _rotationController = AnimationController(vsync: this,duration:const Duration(milliseconds: 1000) );
    super.initState();
  }


  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("动画"),
        centerTitle: true,
      ),
      body: Column(
        children: [
          OutlinedButton(
            onPressed: () {},
            child: const Text("start"),
          ),
          Expanded(
            flex: 1,
            child: Container(
              alignment: Alignment.center,
              child: Image.asset("images/icon_home_car.png", width: 270, height: 110),
            ),
          ),
        ],
      ),
    );
  }
}
